{include file="public_head" /}

<!-- Select2 -->
<link href="__STATIC__/css/select/select2.min.css" rel="stylesheet">

<body class="nav-md">

<div class="container body">

    <div class="main_container">

        {include file="public_sidebar,public_nav" /}
        <!-- page content -->
        <div class="right_col" role="main">
            <div class="">

                <div class="page-title">
                    <div class="title_left">
                        <h3>出库管理</h3>
                    </div>
                </div>
                <div class="clearfix"></div>
                <div class="row">
                    <div class="col-md-12 col-sm-12 col-xs-12">
                        <div class="x_panel">
                            <div class="x_title">

                                <ul class="nav navbar-right panel_toolbox">
                                    <li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
                                    </li>
                                    <li><a class="close-link"><i class="fa fa-close"></i></a>
                                    </li>
                                </ul>
                                <div class="clearfix"></div>
                            </div>
                            <div class="x_content">
                                <br/>
                                <form class="form-horizontal form-label-left" enctype="multipart/form-data" action=""
                                      method="post" id="registerForm" >

                                    <div class="form-group">
                                        <label class="control-label col-md-3 col-sm-3 col-xs-12">门店列表：</label>
                                        <div class="col-md-6 col-sm-6 col-xs-12">
                                            <select name="shop_id[]" class="select2_multiple form-control"
                                                    multiple="multiple"
                                                    style="width: 500px;" tabindex="-1"
                                                    datatype="*"
                                                    nullmsg="请选择门店！" errormsg="请选择门店！"
                                            >
                                                <option value="0"
                                                >
                                                    请选择门店
                                                </option>
                                                {volist name="shop_list" id="list"}
                                                <option value="{$list.id}" {in name="$list.id" value="$item.shop_str"}selected{/in}>

                                                {$list.shop_title}
                                                </option>
                                                {/volist}

                                            </select>
                                        </div>
                                    </div>

                                    <div class="divider-dashed"></div>
									<!--datatype="n"----->
                                    <div class="form-group">
                                        <label class="control-label col-md-3 col-sm-3 col-xs-12">出库数量：</label>
                                        <div class="col-md-1 col-sm-6 col-xs-12">
                                            <input type="text" placeholder="请输入出库数量" {notempty name="$item.count"} readonly {/notempty}
                                                   class="form-control col-md-7 col-xs-12" name="count"
                                                   value="{$item.count|default='0'}"
                                                   
                                                   nullmsg="请输入出库数量！" errormsg="请输入出库数量！"
                                            >
                                        </div>
                                    </div>
                                    <div class="form-group service_people" >
                                        <label class="control-label col-md-3 col-sm-3 col-xs-12">当前审核记录：</label>
                                        <div class="col-md-4 col-sm-6 col-xs-12">
                                            <table class="table table-striped table-bordered table-hover">
                                                <thead>
                                                <th>审核人</th>
                                                <th>审核时间</th>
                                                </thead>


                                                <tbody>
                                                {volist name="records" id="vo"}<tr>
                                                    <td>{$vo.level}</td>
                                                    <td>{$vo.create_time}</td>
                                                </tr>
                                                {/volist}

                                                </tbody>

                                            </table>
                                        </div>
                                    </div>
                                    {include file="auding_status_goods" /}
                                    <input type="hidden" value="{:input('inventory')}"/>
                                    <!--<div class="form-group">-->
                                        <!--<label class="control-label col-md-3 col-sm-3 col-xs-12">派发数量：</label>-->
                                        <!--<div class="col-md-2 col-sm-6 col-xs-12">-->
                                            <!--<input type="text" placeholder="请填写派发数量"-->
                                                   <!--class="form-control col-md-7 col-xs-12" name="number"-->
                                                   <!--value="{$item.number|default=''}"-->
                                                   <!--datatype="int" id="num"-->
                                                   <!--nullmsg="请填写派发数量！" errormsg="请填写派发数量大于1的数字！"-->
                                            <!--&gt;-->
                                        <!--</div>-->
                                    <!--</div>-->

                                    <div class="divider-dashed"></div>

                                    <!--<div class="form-group">-->
                                        <!--<label class="control-label col-md-3 col-sm-3 col-xs-12">上架状态：</label>-->
                                        <!--<div class="col-md-6 col-sm-6 col-xs-12">-->
                                            <!--<label class="radio_box">-->
                                                <!--<input type="radio" name="status" id="status_1" class="cartradio"-->
                                                       <!--value="1"-->
                                                       <!--datatype="*"-->
                                                       <!--nullmsg="请选择启用状态！" errormsg="请选择启用状态！"-->
                                                       <!--{eq name='item.status|default=""' value='1' }-->
                                                       <!--checked-->
                                                       <!--{/eq}-->
                                                <!--&gt;&nbsp;&nbsp;-->
                                                <!--<label for="status_1"></label>-->
                                                <!--<span>上架</span>-->
                                                <!--&nbsp;&nbsp;-->
                                            <!--</label>-->
                                            <!--<label class="radio_box">-->
                                                <!--<input type="radio" name="status" id="status_2" class="cartradio"-->
                                                       <!--value="2"-->
                                                       <!--datatype="*"-->
                                                       <!--nullmsg="请选择启用状态！" errormsg="请选择启用状态！"-->
                                                       <!--{eq name='item.status|default=""' value='2' }-->
                                                       <!--checked-->
                                                       <!--{/eq}-->
                                                <!--&gt;&nbsp;&nbsp;-->
                                                <!--<label for="status_2"></label>-->
                                                <!--<span>下架</span>-->
                                                <!--&nbsp;&nbsp;-->
                                            <!--</label>-->
                                        <!--</div>-->
                                    <!--</div>-->



                                    <div class="form-group">
                                        <div class="col-md-6 col-sm-6 col-xs-12 col-md-offset-3">
                                            {present name="$item.id"}
                                            <input type="hidden" name="id" value="{$item.id}">
                                            {/present}
                                            <!--<input type="hidden" name="member_id" value="0"/>-->
                                            <button type="submit" class="btn btn-primary">提交</button>
                                            <a type="reset" class="btn btn-success" onClick="history.go(-1)">返回</a>
                                        </div>
                                    </div>

                                </form>
                            </div>
                        </div>
                    </div>
                </div>


            </div>
            <!-- /page content -->

        </div>

    </div>
</div>

{include file="public_foot" /}
<!-- validform -->
<script src="__STATIC__/js/Validform_v5.3.2_min.js"></script>
<script src="__STATIC__/js/layer.js"></script>
<!-- daterangepicker -->
<script src="__STATIC__/js/datepicker/daterangepicker.js"></script>
<!--select-->
<script src="__STATIC__/js/select/select2.full.min.js"></script>
<script>
    function ef(){
       var num = $("#num").val();

       if(num <= 1){

           layer.msg("派发数量必须大于1");
           return false;
       }

    }
    // validform
    $(function () {

        $.Tipmsg.r = null;
        $.Datatype.int = /^[1-9]\d*$/;
        var showmsg = function (msg) {
            //假定你的店铺商品提示方法为showmsg， 在方法里可以接收参数msg，当然也可以接收到o及cssctl;
            alert(msg);
        }
        $("#registerForm").Validform({
            tiptype: function (msg) {
                layer.msg(msg);
            },
            tipSweep: true,

        });

        // interval_timer
        $('#interval_timer').daterangepicker(null,
                function(start, end, label) {
                    console.log(start.toISOString(), end.toISOString(), label);
                });

        // select2
        $(".select2_multiple").select2({
            maximumSelectionLength: 0,
            placeholder: "请选择入库门店",
            allowClear: true
        });
    })
</script>
</body>

</html>
